﻿<CodeSnippetTabbed DocLink="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxDataGridColumnChooserToolbarItem">
    <CodeSnippetTabPage Text="Razor">@(@"<DxDataGrid Data=""@DataSource"" CssClass=""mw-1100"">
    <HeaderTemplate>
        <DxToolbar>
            <DxDataGridColumnChooserToolbarItem Alignment=""ToolbarItemAlignment.Right"" />
        </DxToolbar>
    </HeaderTemplate>
    <Columns>
        <DxDataGridColumn Field=""@nameof(Employee.FirstName)"" />
        <DxDataGridColumn Field=""@nameof(Employee.LastName)"" />
        <DxDataGridColumn Field=""@nameof(Employee.Position)"" />
        <DxDataGridDateEditColumn Field=""@nameof(Employee.HireDate)"" />
        <DxDataGridDateEditColumn Field=""@nameof(Employee.BirthDate)"" Visible=""false"" />
        <DxDataGridColumn Field=""@nameof(Employee.FileName)"" Visible=""false"" />
        <DxDataGridColumn Field=""@nameof(Employee.Title)"" Visible=""false"" />
        <DxDataGridColumn Field=""@nameof(Employee.Notes)"" Visible=""false"" />
    </Columns>
</DxDataGrid>

@code {
    IQueryable<Employee> DataSource;

    protected override async Task OnInitializedAsync() {
        DataSource = await EmployeeService.Load();
    }
}")</CodeSnippetTabPage>
</CodeSnippetTabbed>
